import sys
from PIL import Image

def fix(filename):
    image = Image.open(filename).convert("RGBA")
    pixels = image.load()
    width, height = image.size
    for y in xrange(height):
        for x in xrange(width):
            colors = pixels[x,y]
            pixels[x,y] = (colors[0], colors[1], 0, colors[3])
    image.save(filename + "_fixed.png")
    print "done"

if __name__ == "__main__":
    fix(sys.argv[1])